import QueryFilter from "@/components/QueryFilter"
import useAntdList from "@/hooks/useAntdList"
import { queryTracking } from "@/service/monitor"
import { Card, Form, Table } from "antd"

const App = () => {
    const [form] = Form.useForm();
    const { search, tableProps } = useAntdList(queryTracking, {});
    const columns = [{
        title: '类型名称',
        dataIndex: 'category'
    }, {
        title: '动作名称',
        dataIndex: 'action'
    }, {
        title: '标签',
        dataIndex: 'label'
    }, {
        title: '值',
        dataIndex: 'value'
    }, {
        title: '次数',
        dataIndex: 'count'
    }]
    return <Card>
        <QueryFilter
            submit={search.submit}
            reset={search.reset}
            form={form}
            items={[{
                label: '类型名称'
                , name: '类型名称'
            }, {
                label: '动作名称'
                , name: '动作名称'
            }, {
                label: '标签'
                , name: '标签'
            }, {
                label: '值'
                , name: '值'
            }]}
        />
        <Table {...tableProps} columns={columns} />
    </Card>
}
export default App